package main

import (
	"fmt"
	"remove/conf"
)

func main() {
	st := ReadCsVs("result.csv", "song411.csv")
	// ReadCsVs( "result.csv","song411.csv")
	conf.Write(st, "result_411.csv")
	fmt.Println("ok")
}
func ReadCsVs(path1, path2 string) [][]string {
	csv1 := conf.ReadCsv(path1)
	csv2 := conf.ReadCsv(path2)
	mp := make(map[string]struct{})
	for _, v := range csv1 {
		mp[v[0]] = struct{}{}
	}

	st := make([][]string, 0)
	st = append(st, []string{"song_id", "url1", "url2", "gender"})
	for _, v := range csv2 {
		if _, ok := mp[v[0]]; !ok {
			st = append(st, v)
		}
	}
	fmt.Println(len(csv1), len(csv2), len(st))
	return st
}
